// file: BTNode.java
// This file is to define a binary tree node class

public class BTNode
{
    private Object data;
    private BTNode left;
    private BTNode right;
    private BTNode parent;

    // Constructor
    public BTNode(Object o, BTNode theLeft, BTNode theRight, BTNode theParent)
    {
	data = o;
	left = theLeft;
	right = theRight;
	parent = theParent;
    }

    
    public void setData(Object o)
    {
	data = o;
    }

    public void setLeft(BTNode theLeft)
    {
	left = theLeft;
    }

    public void setRight(BTNode theRight)
    {
	right = theRight;
    }

    public void setParent(BTNode theParent)
    {
	parent = theParent;
    }
    
    public Object getData()
    {
	return data;
    }

    public BTNode getLeft()
    {
	return left;
    }

    public BTNode getRight()
    {
	return right;
    }

    public BTNode getParent()
    {
	return parent;
    }
    
    public String toString()
    {
    	return (this.getData()).toString();   	
    }
}
